package cn.mingfancloud.bilibili_java.javabase.a_运算符;

public class ac_隐式强制转换 {
    public static void main(String[] args) {
        /*
        隐式转换
         */

        byte b1 = 10;
        byte b2 = 20;
        //最终变换的数据类型
        int result = b1 + b2;

        int i = 10;
        long n = 100L;
        double d = 20.0;
        //最终变换的数据类型
        double result2 = i + n + d;
        /*
        强制转换
        */

        byte c1 = 10;
        byte c2 = 20;
        //注意下面这行转换
        byte out = (byte) (c1 + c2);
        System.out.println(out);
    }
}
